<form class="layui-form close-dialog parent-refresh" action="/permission/api_admin/edit" method="post" style="padding:20px;">
    <div class="layui-form-item">
        <label class="layui-form-label">菜单类型：</label>
        <div class="layui-input-block">
            <php>$types = C('PERMISSION_TYPES'); $info['type'] = $info['type'] ? $info['type'] : 'M';</php>
            <foreach name="types" item="vo">
                <input type="radio" name="type" value="{$key}" title="{$vo}" <if condition="$info['type'] eq $key">checked</if>>
            </foreach>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">父级菜单：</label>
        <div class="layui-input-block">
            <select name="parentid" lay-verify="required">
                <option value="0">顶级</option>
                {$select_str}
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单名称：</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="name" value="{$info.name}" placeholder="请输入菜单名称">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">路由路径：</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="paths" value="{$info.paths}" placeholder="请输入路由路径">
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">权限标识：</label>
        <div class="layui-input-block">
            <input type="text" class="layui-input" name="perms" value="{$info.perms}" placeholder="请输入权限标识">
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">路由参数：</label>
        <div class="layui-input-block">
            <textarea name="params" placeholder="请输入路由参数" class="layui-textarea">{$info.params}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">是否显示：</label>
        <div class="layui-input-inline">
            <php>
                $isshow = [1=>'显示',0=>'隐藏']; if($info['is_show'] == ''){ $info['is_show'] = 1; }
            </php>
            <foreach name="isshow" item="vo">
                <input type="radio" name="is_show" value="{$key}" title="{$vo}" <if condition="$info['is_show'] eq $key">checked</if>>
            </foreach>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">菜单状态：</label>
        <div class="layui-input-inline">
            <php>
                $status = [0=>'正常',1=>'停用']; if($info['is_disable'] == ''){ $info['is_disable'] = 0; }
            </php>
            <foreach name="status" item="vo">
                <input type="radio" name="is_disable" value="{$key}" title="{$vo}" <if condition="$info['is_disable'] eq $key">checked</if>>
            </foreach>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序：</label>
        <div class="layui-input-inline">
            <input type="number" name="listorder" value="{$info.listorder|default=0}" required lay-verify="required|number" placeholder="请输入排序值" autocomplete="off" class="layui-input">
        </div>
    </div>

    <div class="layui-form-item xy-bottom">
        <div class="layui-input-block">
            <input type="hidden" name="id" value="{$info.id}">
            <button class="layui-btn" lay-submit lay-filter="*">立即提交</button>
        </div>
    </div>
</form>